package cn.weakup.thread.state;

import java.util.concurrent.TimeUnit;

/**
 * @author Dawn
 * @version 1.0.0
 * @desc 让线程不断休眠
 * @date 2022/5/4
 */
public class WaitTime implements Runnable{
    @Override
    public void run() {
        while (true) {
            waitSecond(200);
        }
    }

    public static final void waitSecond(long seconds){
        try {
            TimeUnit.SECONDS.sleep(200);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
